const app = getApp();

Component({
  properties: {
    params: {
      type: Object,
      value: {}
    }
  },
  data: {},
  ready() {
    const {
      padding,
      layout,
      style,
      background,
      images
    } = this.properties.params

    this.setData({
      padding: padding,
      layout: layout,
      style: style,
      background: background,
      images: images
    });
  },
  methods: {
    redirect(event) {
      if (event.currentTarget.dataset.link) {
        app.redirect(event.currentTarget.dataset.link);
      }
    }
  }
})